home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / lldemo / lldemo.shr / ROSETTA.EXE / ROSETTA.DXR / 00599_sound scripts.ls < prev    next >
Encoding:
Text File  |  1996-06-24  |  1.2 KB  |  57 lines

  1. on giveYeahSnd
  2.   global gStuMethod
  3.   set YeahSnd to getaProp(gStuMethod, #yes_sound)
  4.   if YeahSnd <> 4 then
  5.     puppetSound(the name of cast (the number of cast "Harp" + YeahSnd - 1))
  6.   else
  7.     set s to random(6)
  8.     if s <= 3 then
  9.       set s to s - 1
  10.     end if
  11.     puppetSound(the name of cast (the number of cast "Harp" + s))
  12.   end if
  13.   updateStage()
  14. end
  15.  
  16. on giveNoSnd
  17.   global gStuMethod
  18.   set NoSnd to getaProp(gStuMethod, #no_sound)
  19.   if NoSnd <> 4 then
  20.     puppetSound(the name of cast (the number of cast "Organ" + NoSnd - 1))
  21.   else
  22.     set s to random(6)
  23.     if s <= 3 then
  24.       set s to s - 1
  25.     end if
  26.     puppetSound(the name of cast (the number of cast "Organ" + s))
  27.   end if
  28.   updateStage()
  29. end
  30.  
  31. on setVolume y
  32.   global gPathList
  33.   set vol to ((293 - y) / 14) + 1
  34.   if vol < 1 then
  35.     set vol to 1
  36.   else
  37.     if vol > 7 then
  38.       set vol to 7
  39.     end if
  40.   end if
  41.   registerVolume(vol)
  42.   setVolButton(vol)
  43.   updateStage()
  44.   set fname to makeImagePath(gPathList, #sound, 1)
  45.   sound playFile 1, fname
  46.   updateStage()
  47.   set startTicks to the ticks
  48.   repeat while soundBusy(1) and (the ticks < (startTicks + 120))
  49.   end repeat
  50.   sound stop 1
  51. end
  52.  
  53. on registerVolume vol
  54.   set the text of cast "Volume" to string(vol)
  55.   set the soundLevel to integer(vol)
  56. end
  57.